#!/bin/bash

if test "$1" = "-1" ; then
	#indefinite aka no timout
	timesec=""
else
	timesec="-t $1"
fi
shift

if test -n "$1" ; then
	prompty="$@"
fi

read -n 1 -s $timesec -p "$prompty"
clrbuf
exit $?

